<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      i18n:domain="tictheme.alcaldia1"
      metal:use-macro="here/main_template/macros/master">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Bienvenido</title>
        <metal:block fill-slot="style_slot">

        </metal:block>
        <metal:block fill-slot="javascript_head_slot">
            <script type="text/javascript">
                (function($){
                    $(document).ready(function(){
                        var options = {
                            event:'mouseover',
                            selected:0
                        };
                        $("#tabsFront").tabs(options);
                    });
                })(jQuery);
            </script>
        </metal:block>
    </head>
    <body>
        <div metal:fill-slot="main">
            <metal:main-macro define-macro="main">
                <metal:listingmacro define-macro="listing">

                    <div id="tabsFront"
                         tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
                                     isAnon context/@@plone_portal_state/anonymous;
                                     mtool context/portal_membership;
                                     ">
                        <ul>
                            <li tal:condition="view/noticias"><a href="#news">Noticias</a></li>
                            <li tal:condition="view/proyectos"><a href="#proys">proyectos</a></li>
                            <li tal:condition="view/informes"><a href="#informes">Informes</a></li>
                        </ul>
                        <div id ="news"
                             tal:define="news view/noticias"
                             tal:condition="news">
                            <tal:newcontainer  tal:repeat="new news">
                                <div class="newsbox" tal:define="itemTitle new/pretty_title_or_id;
                                                 itemDescription new/Description;
                                                 itemUrl new/getURL|new/absolute_url;
                                                 itemModified new/ModificationDate;
                                                 itemCreator new/Creator;
                                                 itemCreated new/CreationDate;
                                                 itemEffective new/effective/ISO|new/EffectiveDate|nothing;
                                                 object new/getObject|nothing">
                                    <div class="frontImage">
                                        <a href="#"
                                           tal:attributes="href itemUrl">
                                            <img src="" alt=""
                                                 tal:condition="exists:object/image_tile"
                                                 tal:replace="structure python: path('nocall:object/tag')(scale='tile', css_class='tileImage')"/>
                                        </a>
                                    </div>
                                    <div class="frontBody">
                                        <h3 class="tileHeadline">
                                            <a href="#"
                                               class="summary url"
                                               tal:attributes="href itemUrl"
                                               tal:content="itemTitle">
                                                Item Title
                                            </a>
                                        </h3>

                                        <a name="fb_share" type="icon_link" style="width:55px; height: 20px;"
                                           share_url="YOUR_URL"
                                           tal:attributes="share_url itemUrl">&nbsp;</a>
                                        <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
                                                type="text/javascript">
                                        </script>
                                        
                                        <span class="custom-tweet-button">
                                            <script type="text/javascript" 
                                                    src="http://platform.twitter.com/widgets.js">
                                            </script>
                                            <a href="http://twitter.com/share"
                                               class="twitter-share-button"
                                               data-count="none"
                                               data-url="http://dev.twitter.com/pages/tweet_button"
                                               data-via="your_screen_name"
                                               data-text="Checking out this page about Tweet Buttons"
                                               data-related="anywhere:The Javascript API"
                                               tal:attributes="data-url itemUrl"
                                               >&nbsp;</a>
                                        </span>
                                        <div class="effectiveDate">
                                            <span tal:content="python:toLocalizedTime(itemModified,long_format=1)"/>
                                        </div>
                                        <div class="documentByLine"
                                             tal:condition="python:not isAnon">
                                            <tal:name
                                                condition="itemCreator"
                                                define="author python:mtool.getMemberInfo(itemCreator)">
                                                <span i18n:translate="label_by_author">
                                                    by
                                                    <a href="#"
                                                       tal:attributes="href string:${context/@@plone_portal_state/navigation_root_url}/author/${itemCreator}"
                                                       tal:content="python:author and author['fullname'] or itemCreator"
                                                       tal:omit-tag="not:author"
                                                       i18n:name="author"/>
                                                </span>
                                            </tal:name>
                                        </div>
                                        <p class="tileBody">
                                            <span tal:omit-tag="" tal:condition="not:itemDescription">
                                                &nbsp;
                                            </span>
                                            <span class="description" tal:content="python:itemDescription[0:150]">
                                                description
                                            </span><span tal:content="string:...">punto suspensivo</span>
                                            <a href="itemUrl" tal:attributes="href itemUrl">Leer mas</a>
                                        </p>
                                    </div>
                                </div>
                            </tal:newcontainer>
                            <p>
                                <a tal:content="string: Ver todas"
                                   tal:attributes="href python:context.portal_url() + '/noticias'"/>
                            </p>
                            <div class="clear"></div>
                        </div>

                        <div id="proys" tal:define="projects view/proyectos"
                             tal:condition="projects">
                            <tal:block define="toLocalizedTime nocall:context/@@plone/toLocalizedTime"
                                       repeat="project projects">
                                <tal:content define="title project/pretty_title_or_id;
                                                     url project/getURL|project/absolute_url;
                                                     description project/Description;
                                                     created project/CreationDate;
                                                     object project/getObject;
                                                     fechaIni project/start/ISO|project/StartDate|nothing;
                                                     fechaFin project/end/ISO|project/EndDate|nothing;
                                                     imagen object/@@images/imagen/mini|nothing;
                                                     anio object/anio">
                                    <div class="frontProys">
                                        <div class="frontImage">
                                            <a href="" tal:attributes="href url;
                                                                       alt title;
                                                                       title title"
                                                       tal:condition="python:imagen">
                                                <img src="" alt="" tal:replace="structure imagen"/>
                                            </a>
                                        </div>
                                        <div class="frontBody">
                                            <h3 class="tileHeadline">
                                                <a tal:attributes="href url"
                                                   tal:content="title"/>
                                            </h3>

                                            <span class="share">Compartir</span>
                                            <a name="fb_share" type="icon_link"
                                               share_url="YOUR_URL"
                                               tal:attributes="share_url url">&nbsp;</a>
                                            <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
                                                    type="text/javascript">
                                            </script>

                                            <a href="http://twitter.com/share"
                                                   class="twitter-share-button"
                                                   data-count="none"
                                                   data-url="http://dev.twitter.com/pages/tweet_button"
                                                   data-via="your_screen_name"
                                                   data-text="Checking out this page about Tweet Buttons"
                                                   data-related="anywhere:The Javascript API"
                                                   tal:attributes="data-url url"
                                                   >&nbsp;</a>
                                            <script type="text/javascript"
                                                    src="http://platform.twitter.com/widgets.js">
                                            </script>

                                            <div class="effectiveDate" tal:condition="python:fechaIni and fechaFin">
                                                <span>Inicio: </span>
                                                <div tal:content="python:toLocalizedTime(fechaIni,long_format=1)"/>
                                                <span>Fin: </span>
                                                <div tal:content="python:toLocalizedTime(fechaFin,long_format=1)"/>
                                                <span tal:content="string: Año:${anio}"/>
                                            </div>
                                            <p class="tileBody">
                                                <span class="description" tal:content="python:description[0:400]"/>
                                                <span class="description" tal:content="string:..."/>
                                                <a href="" tal:attributes="href url">Leer Mas</a>
                                            </p>
                                        </div>
                                    </div>
                                </tal:content>
                            </tal:block>
                            <p>
                                <a tal:content="string: Ver todos"
                                   tal:attributes="href python:context.portal_url() + '/planes-programas-y-proyectos/proyectos'"/>
                            </p>
                            <div class="clear"></div>
                        </div>
                    <div id="informes" tal:condition="informes"
                         tal:define="informes view/informes">
                        <tal:block repeat="informe informes">
                            <tal:content define="title informe/pretty_title_or_id|nothing;
                                                 url informe/getURL|project/absolute_url|nothing;
                                                 description informe/Description|nothing;
                                                 created informe/CreationDate|nothing;
                                                 itemModified informe/ModificationDate|nothing;
                                                 itemEffective informe/effective/ISO|informe/EffectiveDate|nothing;
                                                 object informe/getObject|nothing;
                                                 image object/@@images/image/thumb|nothing;
                                                 ">
                                <div class="frontImage">
                                    <a href="" tal:attributes="href url;
                                                               alt title;
                                                               title title">
                                        <img src="" alt="" tal:condition="python: image"
                                             tal:replace="structure object/@@images/image/thumb"/>
                                    </a>
                                </div>
                                <div class="frontBody">
                                    <h3 class="tileHeadline">
                                        <a tal:attributes="href url"
                                           tal:content="title"/>
                                    </h3>
                                    <span class="share">Compartir</span>
                                    <a name="fb_share" type="icon_link"
                                       share_url="YOUR_URL"
                                       tal:attributes="share_url url">&nbsp;</a>
                                    <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
                                            type="text/javascript">
                                    </script>
                                    <a href="http://twitter.com/share"
                                           class="twitter-share-button"
                                           data-count="none"
                                           data-url="http://dev.twitter.com/pages/tweet_button"
                                           data-via="your_screen_name"
                                           data-text="Checking out this page about Tweet Buttons"
                                           data-related="anywhere:The Javascript API"
                                           tal:attributes="data-url url"
                                           >&nbsp;</a>
                                    <script type="text/javascript"
                                            src="http://platform.twitter.com/widgets.js">
                                    </script>
                                    <div class="effectiveDate">
                                        <span tal:content="python:toLocalizedTime(itemModified,long_format=1)"/>
                                    </div>
                                    <p class="tileBody">
                                        <span class="description" tal:content="python:description[0:150]"/>
                                        <span class="description" tal:content="string:..."/>
                                    </p>
                                </div>
                            </tal:content>
                        </tal:block>
                        <div class="clear"></div>
                        <p>
                            <a tal:content="string: Ver todos"
                               tal:attributes="href python:context.portal_url() + '/informes-de-gestion-municipal/'"/>
                        </p>
                    </div>
                </div>
                <div class="clear"></div>
                </metal:listingmacro>
            </metal:main-macro>
        </div>
    </body>
</html>
